<template>
  <div class='my-offer'>
    <DetailHead @doReject="doReject" @doSubmit="doSubmit" />
    <DetailBody :data="detailData" :isSubmit="isSubmit" :ids="id" />
  </div>
</template>
<script>
import DetailHead from '../../buyer/specify/detail/head.vue'
import DetailBody from './body.vue'
import MixDetail from '@/mix/mixDetail.js'
export default {
  components: {DetailHead,DetailBody},
  name: "",
  data() {
    return {
      detailData:{
        data:[],
        vo:{}
      },
      isSubmit:false,//
    };
  },
  methods: {
    init:async function(){
      await this.getDetail();
    },

    /**
     * @name 拒绝报价
     */
    doReject(){
      _g.apiPost('quotationManage/refuseQuotation.do',{id:this.id}).then(res=>{
        _g.toMessage(res)
        if(res.status===0){
          this.$router.go(-1)
        }
      })
    },

    /**
     * @name 提交
     */
    doSubmit(){
      this.isSubmit=true
      setTimeout(()=>{
        this.isSubmit=false
      },0)
    }
  },
  created() {
    this.init()
  },
  mixins:[MixDetail]
};
</script>
<style lang="scss" scoped>
.my-offer {
  padding-bottom: 150px;
}
</style>